<template>
  <div id="app">
    <layout>
      <transition name="jump">
        <router-view />
      </transition>
    </layout>
  </div>
</template>

<script>
import MLayout from "./views/mobile/Layout";
import PCLayout from "./views/computer/Layout";
import { checkIsMobile } from "./utils/checkDevice";
import Tokens from "@/mixins/getTokens.js";
export default {
  mixins: [Tokens],
  components: {
    layout: checkIsMobile() ? MLayout : PCLayout
  },
  data() {
    return {
      isMobile: false,
      transtionName: "slide-right"
    };
  },
  mounted() {
    this.isMobile = checkIsMobile();
  }
};
</script>

<style lang="scss">
#app {
  .jump-enter-active {
    transition: opacity 0.3s;
  }
  .jump-enter {
    opacity: 0;
  }
}
</style>
